package com.heima.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.article.pojo.ArticleConfig;
import com.heima.mapper.ArticleConfigMapper;
import com.heima.service.ArticleConfigService;
import org.springframework.stereotype.Service;

@Service
public class ArticleConfigServiceImpl extends ServiceImpl<ArticleConfigMapper, ArticleConfig> implements ArticleConfigService {

    //当自媒体文章审核通过时，添加Article表同时，添加ArticleConfig表
    public void saveArticleConfig(Long articleId){
        //这里只添加一个id值，其它有默认属性
        ArticleConfig articleConfig = new ArticleConfig();
        articleConfig.setArticleId(articleId);
        save(articleConfig);
    }
}
